const mysql = require("mysql");
const config = require("./config");
module.exports = () => {
  return new Promise((on, off) => {
    let connection = mysql.createConnection({ database: "information_schema", port: config.connection_port, host: config.connection_port.host, user: config.connection_user, password: config.connection_password });
    connection.connect((err) => {
      if (err) off(err);
      else on(connection);
    });
  });
};
